<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>title</title>
    <link href="bootstrap-4.6.1-dist/css/bootstrap.css" rel="stylesheet" type="text/css">
    <script src="jQuery/jquery-3.6.0.min.js"></script>
    <script src="bootstrap-4.6.1-dist/js/bootstrap.min.js"></script>
    <style>
        body {
            font: 16px 'Microsoft YaHei';
        }
        h1 {
            text-align: center;
            font-weight: 400;
        }
        div {
            color: #888;
            font-size: 12px;
            text-align: center;
        }
        a {
            text-decoration: none;
        }
        p {
            text-indent: 2em;
        }
        .end {
            font-size: 12px;
            color: #666;
        }
    </style>
</head>

<body>
<ul class="nav navbar-list bg-light">
    <div class="nav-item">
        <h2 style="color: #005cbf">爱思教育</h2>
    </div>
    <div class="col-1">
        <!--        占位-->
    </div>
    <li class="nav-item">
        <a class="nav-link" href="index.html">返回主页</a>
    </li>
    <li class="nav-item">
        <a class="nav-link" href="newsList.html">新闻列表</a>
    </li>
</ul>
<div id="news">

</div>
</body>
<script>
    jQuery(function () {
        let loc = location.href;
        let n1 = loc.length;
        let n2 = loc.indexOf("=");
        let id = decodeURI(loc.substr(n2+1, n1-n2));
        jQuery.post("news/info",{id:id},function (data) {
            let txt=`
    <h1>${data.newsTitle}</h1>
    <div>${data.newsDate}</div>
    <hr>
    <p></p>
    <h4 class="text-left">${data.newsText}</h4>
    <p class="end">本文来源：爱思教育 责任编辑：${data.newsEditorId}</p>
            `;
            jQuery("#news").html(txt);
        })
    })
</script>
</html>
<!--http://localhost:8088/edusys/newsInfo.html#-->